/*
FxSound
Copyright (C) 2023  FxSound LLC

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/* Dsp related constants */
/* Note- use an alpha that can be exactly
 * represented so 1.0 in gives 1.0 out.
 */
#define DELAY_CONTROL_ALPHA 1.0/8192.0

#define DSP_MAX_NUM_OF_DELAY_ELEMENTS 8
#define DSP_NUM_DELAY_PAIRS 8   
#define DSP_DELAY_MIN_VALUE          0L
#define DSP_FEEDBACK_MIN_VALUE -1.0
#define DSP_FEEDBACK_MAX_VALUE 1.0

#define ELEM0_DELAY 20L + COMM_MEM_OFFSET
#define ELEM1_DELAY 21L + COMM_MEM_OFFSET
#define ELEM2_DELAY 22L + COMM_MEM_OFFSET
#define ELEM3_DELAY 23L + COMM_MEM_OFFSET
#define ELEM4_DELAY 24L + COMM_MEM_OFFSET
#define ELEM5_DELAY 25L + COMM_MEM_OFFSET
#define ELEM6_DELAY 26L + COMM_MEM_OFFSET
#define ELEM7_DELAY 27L + COMM_MEM_OFFSET
#define ELEM8_DELAY 28L + COMM_MEM_OFFSET
#define ELEM9_DELAY 29L + COMM_MEM_OFFSET
#define ELEM10_DELAY 30L + COMM_MEM_OFFSET
#define ELEM11_DELAY 31L + COMM_MEM_OFFSET
#define ELEM12_DELAY 32L + COMM_MEM_OFFSET
#define ELEM13_DELAY 33L + COMM_MEM_OFFSET
#define ELEM14_DELAY 34L + COMM_MEM_OFFSET
#define ELEM15_DELAY 35L + COMM_MEM_OFFSET

#define ELEM0_FEEDBACK 36L + COMM_MEM_OFFSET
#define ELEM1_FEEDBACK 37L + COMM_MEM_OFFSET
#define ELEM2_FEEDBACK 38L + COMM_MEM_OFFSET
#define ELEM3_FEEDBACK 39L + COMM_MEM_OFFSET
#define ELEM4_FEEDBACK 40L + COMM_MEM_OFFSET
#define ELEM5_FEEDBACK 41L + COMM_MEM_OFFSET
#define ELEM6_FEEDBACK 42L + COMM_MEM_OFFSET
#define ELEM7_FEEDBACK 43L + COMM_MEM_OFFSET
#define ELEM8_FEEDBACK 44L + COMM_MEM_OFFSET
#define ELEM9_FEEDBACK 45L + COMM_MEM_OFFSET
#define ELEM10_FEEDBACK 46L + COMM_MEM_OFFSET
#define ELEM11_FEEDBACK 47L + COMM_MEM_OFFSET
#define ELEM12_FEEDBACK 48L + COMM_MEM_OFFSET
#define ELEM13_FEEDBACK 49L + COMM_MEM_OFFSET
#define ELEM14_FEEDBACK 50L + COMM_MEM_OFFSET
#define ELEM15_FEEDBACK 51L + COMM_MEM_OFFSET

#define ELEM0_PAN_GAIN_LEFT 52L + COMM_MEM_OFFSET
#define ELEM1_PAN_GAIN_LEFT 53 + COMM_MEM_OFFSET
#define ELEM2_PAN_GAIN_LEFT 54L + COMM_MEM_OFFSET
#define ELEM3_PAN_GAIN_LEFT 55L + COMM_MEM_OFFSET
#define ELEM4_PAN_GAIN_LEFT 56L + COMM_MEM_OFFSET
#define ELEM5_PAN_GAIN_LEFT 57L + COMM_MEM_OFFSET
#define ELEM6_PAN_GAIN_LEFT 58L + COMM_MEM_OFFSET
#define ELEM7_PAN_GAIN_LEFT 59L + COMM_MEM_OFFSET
#define ELEM8_PAN_GAIN_LEFT 60L + COMM_MEM_OFFSET
#define ELEM9_PAN_GAIN_LEFT 61L + COMM_MEM_OFFSET
#define ELEM10_PAN_GAIN_LEFT 62L + COMM_MEM_OFFSET
#define ELEM11_PAN_GAIN_LEFT 63L + COMM_MEM_OFFSET
#define ELEM12_PAN_GAIN_LEFT 64L + COMM_MEM_OFFSET
#define ELEM13_PAN_GAIN_LEFT 65L + COMM_MEM_OFFSET
#define ELEM14_PAN_GAIN_LEFT 66L + COMM_MEM_OFFSET
#define ELEM15_PAN_GAIN_LEFT 67L + COMM_MEM_OFFSET

#define ELEM0_PAN_GAIN_RIGHT 68L + COMM_MEM_OFFSET
#define ELEM1_PAN_GAIN_RIGHT 69L + COMM_MEM_OFFSET
#define ELEM2_PAN_GAIN_RIGHT 70L + COMM_MEM_OFFSET
#define ELEM3_PAN_GAIN_RIGHT 71L + COMM_MEM_OFFSET
#define ELEM4_PAN_GAIN_RIGHT 72L + COMM_MEM_OFFSET
#define ELEM5_PAN_GAIN_RIGHT 73L + COMM_MEM_OFFSET
#define ELEM6_PAN_GAIN_RIGHT 74L + COMM_MEM_OFFSET
#define ELEM7_PAN_GAIN_RIGHT 75L + COMM_MEM_OFFSET
#define ELEM8_PAN_GAIN_RIGHT 76L + COMM_MEM_OFFSET
#define ELEM9_PAN_GAIN_RIGHT 77L + COMM_MEM_OFFSET
#define ELEM10_PAN_GAIN_RIGHT 78L + COMM_MEM_OFFSET
#define ELEM11_PAN_GAIN_RIGHT 79L + COMM_MEM_OFFSET
#define ELEM12_PAN_GAIN_RIGHT 80L + COMM_MEM_OFFSET
#define ELEM13_PAN_GAIN_RIGHT 81L + COMM_MEM_OFFSET
#define ELEM14_PAN_GAIN_RIGHT 82L + COMM_MEM_OFFSET
#define ELEM15_PAN_GAIN_RIGHT 83L + COMM_MEM_OFFSET

#define ELEM0_GAIN 84L + COMM_MEM_OFFSET
#define ELEM1_GAIN 85L + COMM_MEM_OFFSET
#define ELEM2_GAIN 86L + COMM_MEM_OFFSET
#define ELEM3_GAIN 87L + COMM_MEM_OFFSET
#define ELEM4_GAIN 88L + COMM_MEM_OFFSET
#define ELEM5_GAIN 89L + COMM_MEM_OFFSET
#define ELEM6_GAIN 90L + COMM_MEM_OFFSET
#define ELEM7_GAIN 91L + COMM_MEM_OFFSET
#define ELEM8_GAIN 92L + COMM_MEM_OFFSET
#define ELEM9_GAIN 93L + COMM_MEM_OFFSET
#define ELEM10_GAIN 94L + COMM_MEM_OFFSET
#define ELEM11_GAIN 95L + COMM_MEM_OFFSET
#define ELEM12_GAIN 96L + COMM_MEM_OFFSET
#define ELEM13_GAIN 97L + COMM_MEM_OFFSET
#define ELEM14_GAIN 98L + COMM_MEM_OFFSET
#define ELEM15_GAIN 98L + COMM_MEM_OFFSET
